#pragma once

#ifndef ANCHOREDSPRING_H
#define ANCHOREDSPRING_H

#include <d3dx9.h>
#pragma comment(lib, "d3dx9.lib")
#include "ForceGenerator.h"

class AnchoredSpring : public ForceGenerator
{
protected:
	D3DXVECTOR3 anchor;
	float springConstant;
	float restLength;
public:
	AnchoredSpring(D3DXVECTOR3 anchor, float springConstant, float restLength)
		: anchor(anchor), springConstant(springConstant), restLength(restLength)
	{
	}
	virtual ~AnchoredSpring(void) { }
	virtual void updateForce(Particle* particle, float frameTime);
};

#endif